package classfile

type SourceFileAttribute struct {
	cp ConstantPool
	sourceFileIndex uint16
}

func (self *SourceFileAttribute)ReadInfo(reader *ClassReader) {
	self.sourceFileIndex = reader.ReadUint16()
}

func (self *SourceFileAttribute)FileName() string {
	if self.cp == nil {
		return ""
	}
	return self.cp.getUtf8(self.sourceFileIndex)
}